function Click(collect){
    this.clickCollectRegExp = /^click[A-Z]\w+$/;
    var me = this;
    this.autoClickStatus = false;
    if (collect.autoClick) {
        // 自动采集的节点层级，默认 8 层
        var collectLv = isNumber(collect.autoClick) ? collect.autoClick : 8;
        // 全局点击监测
        document.body.addEventListener("click", function clickHandler($ev) {
            //  待发送的数据
            var data = {};
            // 冒泡路径
            var path;
            // 待采集的节点
            var target;
            // 是否有确切数据
            var hasKey;
            // 当前采集的层级
            var nowLv = 0;
            // 数据构造结果
            var re;

            // 有冒泡路径的情况
            if ($ev.path) {
                path = [].concat($ev.path);
                // 采集逻辑
                while(
                    nowLv <= collectLv &&
                    path.length &&
                    (!target || target && target.nodeName !== "HTML")
                ) {
                    target = path.shift();
                    if (target) {
                        re = me.buildData(target.dataset || {}, data);
                        if (re && !hasKey) {
                            hasKey = true;
                        }
                    }
                    ++nowLv;
                }
            } else {
                // 没有冒泡节点的时候使用传统做法

                target = $ev.srcElement || $ev.target;
                while(
                    nowLv <= collectLv && target.nodeName !== "HTML"
                ) {
                    if (target) {
                        re = me.buildData(target.dataset || {}, data);
                        if (re && !hasKey) {
                            hasKey = true;
                        }
                        target = target.parentNode;
                    } else {
                        break;
                    }
                    ++nowLv;
                }
            }
            // 发送数据
            // 默认情况下强制要求传递 btn_name
            if (
                hasKey &&
                collect.alwayClick || (!collect.alwayClick && data.btn_name)
            ) {
                target = $ev.srcElement || $ev.target;
                if (
                    target.nodeName === "A" &&
                    target.href !== "" &&
                    target.getAttribute("target") !== "_blank"
                ) {
                    var href = target.href;
                    $ev.preventDefault();
                    try {
                        clientCollect.send("click", data);
                    } catch(e) {
                    } finally {
                        setTimeout(function(){
                            window.location.href = href;
                        }, 150);
                    }
                } else {
                    clientCollect.send("click", data);
                }
            }
        }, false);
        this.autoClickStatus = true;
    }
}
var ClickPrototype = Click.prototype;
ClickPrototype.name = "click";
ClickPrototype.report = function(){
    return {}
}
/**
 * 获取要上传的数据键名
 * @param  {String} key 待处理的键名
 * @return {String}     处理后的键名
 */
ClickPrototype.getCollectKey = function(key) {
    return key.replace("click", "").toLocaleLowerCase();
}

/**
 * 构建要发送的数据
 * @param  {Object}  ds   原始 dataset 数据
 * @param  {Object}  data 待发送数据对象
 * @return {Boolean}      是否有数据
 */
ClickPrototype.buildData = function (ds, data) {
    var hasKey = false;
    for (var n in ds) {
        if (this.clickCollectRegExp.test(n)) {
            data[this.getCollectKey(n)] = ds[n];
            hasKey = true;
        }
    }
    return hasKey;
}

clientCollect.add(Click);
